export const schema = {
    type: "page",
    title: "查看机构详情",
    toolbar: {
        type: "button",
        actionType: "link",
        label: "返回",
        link: "/org/list"
    },
    body: {
        initApi: "get:/api/org/${id}",
        submitText: "",
        name: "theform",
        type: "form",
        title: "",
        mode: "horizontal",
        controls: [
            {
                type: "static",
                name: "name",
                label: "机构名称"
            },

            {
                type: "divider"
            },

            {
                type: "static-image",
                name: "logo",
                label: "Logo"
            },

            {
                type: "divider"
            },

            {
                type: "static",
                name: "type",
                label: "机构类型"
            },

            {
                type: "divider"
            },

            [{
                type: "static",
                name: "contact_name",
                label: "联系人"
            },

            {
                type: "static",
                name: "contact_phone",
                label: "联系电话"
            }],

            {
                type: "divider"
            },

            {
                type: "static",
                name: "contact_email",
                label: "联系邮箱"
            },

            {
                type: "divider"
            },

            {
                type: "static",
                name: "address",
                label: "联系地址",
                tpl: "${address.province} ${address.city} ${address.district} ${address.address}"
            },

            {
                type: "divider"
            },

            [{
                type: "static",
                name: "corporate_name",
                label: "机构法人姓名"
            },

            {
                type: "static",
                name: "corporate_id",
                label: "法人身份证号"
            }],

            {
                type: "divider"
            },

            {
                type: "static",
                name: "corporate_phone",
                label: "法人联系电话"
            },

            {
                type: "divider"
            },

            {
                type: "static-image",
                name: "quality",
                label: "上传资质",
                desc: "上传资质文件做个说明",
                multiple: true,
                imageWrapClassName: 'thumb-lg m-r-xs',
                popOver: {
                    title: "",
                    body:
                    '<div class="w-xx-xxl"><% data.quality && data.quality.split(",").map(function(src) { %><img class="w-full m-b-sm" src="<%= src %>" /><% }) %></div>'
                }
            },

            {
                type: "divider"
            },

            {
                type: "static",
                name: "username",
                label: "帐号"
            },

            {
                type: "divider"
            },

            {
                type: "static",
                name: "pwd",
                label: "密码",
                tpl: "<span class='text-muted'>不可见</span>"
            },

            {
                type: "divider"
            },

            {
                type: "static",
                name: "email",
                label: "邮箱"
            }
        ]
    }
};
